<?php
/**
 * Created by Zhy
 * User: Zhy
 * Date: 2018/6/21
 * Time: 10:12
 */

namespace app\common\model;


use think\Model;

class Area extends Model
{
    protected $hidden = ['level', 'pid'];

    protected $table='up_area';

    public function selectArea($where){
        $model = self::instance();
        $list = $model->where($where)->select();
        return $list;
    }

    private static $instance;

    public static function instance()
    {
        if (!(self::$instance instanceof self)) {
            self::$instance = new self();
        }
        return self::$instance;
    }
}